package com.vhly.ddxdecompiler.dexreader.file.dalv.code.reader;

import com.vhly.ddxdecompiler.dexreader.file.dalv.code.DalvInsn;
import com.vhly.ddxdecompiler.dexreader.io.DexInputStream;

import java.io.IOException;

/**
 * Created by IntelliJ IDEA.
 * User: vhly
 * Date: 2009-10-21
 * Time: 14:11:23
 *
 * @author vhly[FR]
 */
public abstract class InsnReader {
    /**
     * 读取的short个数
     * @param insn
     * @param din
     * @return
     * @throws IOException
     */
    public int read(DalvInsn insn, DexInputStream din) throws IOException{
        return 0;
    }

    public boolean hasRegister() {
        return true;
    }

    public abstract void prepair(DalvInsn dalvInsn, int reg);
}
